export function toast(title){
	uni.showToast({
		icon:'none',
		title:title,
		position:'bottom',
	})
}

export function nav(url,type=0){
	
	if(type == 0){
		uni.navigateTo({
			url:url
		})
	}else if(type == 1){
		uni.switchTab({
			url:url
		})
	}else if(type == 3){
		uni.navigateBack({
			
		})
	}
}

export function isEmpty(e){
	if(e==undefined || e==''){
		return true;
	}
	return false;
	
}
export function formatFloat(value,length=2){  
    let tempNum = 0;  
    let s,temp;  
    let s1 = value + "";  
    let start = s1.indexOf(".");  
    if(s1.substr(start+length+1,1)>=5){
        tempNum=1;  
    }
    temp = Math.pow(10,length);  
    s = Math.floor(value * temp) + tempNum;  
    return s/temp;  
}